import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.*;

/**
 * Write a description of class Help here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Credits extends Button
{
    /**
     * Act - do whatever the Help wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public Credits()
    {
        setImage("credits.png");
        
    }
    
    public void act() 
    {
        // Add your action code here.
        if(Greenfoot.mouseClicked(this)){  
               getWorld().setBackground("creditos.png");
               
              World world= getWorld();
              world.removeObjects((getWorld().getObjects(Message.class)));
              world.removeObjects((getWorld().getObjects(Button.class)));
            
              world.addObject(new MenuBoton(),35,380);
                
               
    } 
    
    }   
}

